import java.util.Arrays;
import java.util.Scanner;

class Tool {
    public static String max(String s1, String s2) {
        int ret = s1.compareTo(s2);
        if (ret > 0)
            return s1;
        else
            return s2;
    }

    public static int max(int x, int y) {
        if (x > y)
            return x;
        else
            return y;
    }
}

public class Text {
    public static void main(String[] args) {
            int[] arr1 = {2, 6, 4, 1};
            int[] arr2 = {1, 2, 34, 3, 4, 5, 7, 23, 12};
            System.out.println(hasThreeOdds(arr1));
            System.out.println(hasThreeOdds(arr2));
        }

        public static boolean hasThreeOdds(int[] arr) {
            for (int i = 0; i < arr.length - 2; i++) {
                if (arr[i] % 2 != 0 && arr[i + 1] % 2 != 0 && arr[i + 2] % 2 != 0) {
                    return true;
                }
            }
            return false;
        }
    public static void main8(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int[] nums=new int[n];
        for (int i = 0; i < nums.length; i++) {
            nums[i]=sc.nextInt();
        }
        Arrays.sort(nums);
        int len=0;
        int max=0;
        int l=0,r=1;
        while(r<nums.length){
            if(nums[l]==nums[r]){
                r++;
                len=r-l+1;
            }
            else{
                l=r;
            }
            if(max<len){
                max=len;
            }
            if(max>nums.length/2){
                break;
            }
        }
        System.out.println(nums[r]);
    }
    public static void main7(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int[] nums=new int[n];
        for (int i = 0; i < nums.length; i++) {
            nums[i]=sc.nextInt();
        }
        int k=0;
        for (int i = 0; i < nums.length; i++) {
            k^=nums[i];
        }
        System.out.println(k);
    }
    public static void sums(int[] nums,int k,int[] array){
        int left=0;
        int right=nums.length-1;
        while(left<right){
            if(nums[right]+nums[left]>k){
                right--;
            }
            else if(nums[left]+nums[right]<k){
                left++;
            }
            else{
                array[0]=left;
                array[1]=right;
                break;
            }
        }
    }
    public static void main6(String[] args) {
        int[] nums={2,7,11,15};
        int target=9;
        int[] array=new int[2];
        sums(nums,target,array);
        System.out.println(Arrays.toString(array));
    }
    public static void bubblesort(int[] array){
        for (int i = 0; i < array.length - 1; i++) {
            boolean flg=false;
            for (int j = 0; j < array.length - 1 - i; j++) {
                if(array[j]>array[j+1]){
                    int tmp=array[j];
                    array[j]=array[j+1];
                    array[j+1]=tmp;
                    flg=true;
                }
            }
            if(flg==false){
                return;
            }
        }
    }
    public static void main5(String[] args) {
        int[] array={1,5,3,6,2,9,7,8,4};
        bubblesort(array);
        System.out.println(Arrays.toString(array));
    }
    public static boolean bisearch(int[] array,int k){
        int left=0;
        int right=array.length-1;
        while(left<right){
            int mid=(left+right)/2;
            if(array[mid]<k){
                left=mid+1;
            }
            else if(array[mid]>k){
                right=mid-1;
            }
            else{
                return true;
            }
        }
        return false;
    }
    public static void main4(String[] args) {
        Scanner sc=new Scanner(System.in);
        int k=sc.nextInt();
        int[] array={1,2,3,4,5,6,7,8,9,10};
        boolean ret= bisearch(array,k);
        if(ret==true)
            System.out.println("找到了！");
        else
            System.out.println("没找到！");
    }
    public static void myjust(int[] array){
        int left = 0;
        int right = array.length - 1;

        while (left < right) {
            if (array[left] % 2 != 0) {
                left++;
                continue; // 跳出当前循环
            }
            if (array[right] % 2 == 0) {
                right--;
                continue; // 跳出当前循环
            }
            if (array[left] % 2 == 0 && array[right] % 2 != 0) {
                int tmp = array[left];
                array[left] = array[right];
                array[right] = tmp;
            }
            left++;
            right--;
        }
    }
    public static void main3(String[] args) {
        int[] array={1,2,3,4,5,6};
        myjust(array);
        System.out.println(Arrays.toString(array));
    }
    public static void transform(int[] array){
        for (int i = 0; i < array.length; i++) {
            array[i]*=2;
        }
    }
    public static void main2(String[] args) {
        int[] array={1,2,3};
        transform(array);
        System.out.println(Arrays.toString(array));
    }
    public static void main1(String[] args) {
        String s1, s2;
        int x, y;
        Scanner in = new Scanner(System.in);
        s1 = in.nextLine();
        s2 = in.nextLine();
        x = in.nextInt();
        in.nextLine(); // consume the newline character
        y = in.nextInt();
        System.out.println("the larger value is:" + Tool.max(s1, s2));
        System.out.println("the larger value is:" + Tool.max(x, y));

    }
}